unit uGame;

interface

uses uUniverse, uEmpire, cuVector, cuZoom;

type
  TGame = class( TObject )
  private
    m_updateStarMap        : boolean; // Once called it will update the Star Map Texture, This saves FPS rather than updating every render.
    m_updateColonyMap      : boolean;
    m_updateFleetMap       : boolean;
    m_updateAllMaps        : boolean;
  public
    Universe     : TUniverse;
    Empire       : TEmpireList;

    focusVector  : TVector2D;
    theZoom      : TZoom;


    constructor Create();
    destructor Destroy();
    procedure updateStarMap(theValue:boolean=TRUE);
    procedure updateColonyMap(theValue:boolean=TRUE);
    procedure updateFleetMap(theValue:boolean=TRUE);
    procedure updateAllMaps(theValue:boolean=TRUE);
  end;

implementation

uses SysUtils;

constructor TGame.Create();
begin
  Universe := TUniverse.Create();
  Empire   := TEmpireList.Create();

  focusVector := TVector2D.Create();

  inherited;
end;
destructor TGame.Destroy();
begin
  FreeAndNil( Universe );
  FreeAndNil( Empire );

  FreeAndNil( focusVector );

  inherited;
end;

procedure TGame.updateStarMap(theValue:boolean=TRUE);
begin
  m_updateStarMap := theValue;
end;
procedure TGame.updateColonyMap(theValue:boolean=TRUE);
begin
  m_updateColonyMap := theValue;
end;
procedure TGame.updateFleetMap(theValue:boolean=TRUE);
begin
  m_updateFleetMap := theValue;
end;
procedure TGame.updateAllMaps(theValue:boolean=TRUE);
begin
  m_updateAllMaps := theValue;
end;

end.
